#include "encryption.hpp"

char key[20] = "$^*#@!(aui1687&^12";


using namespace std;

string paradise_encryption::encryption(char* buf, int len)
{


	for (int i = 0; i < len; ++i)
	{
		char k = key[(i % 20)];
		buf[i] = (buf[i] + 1) ^ k;
	}

	string tmp(buf, len);
	return tmp;
}

string paradise_encryption::decryption(char* buf, int len)
{
	for (int i = 0; i < len; ++i)
	{
		char k = key[(i % 20)];
		buf[i] = (buf[i] ^ k) - 1;
	}

	string tmp(buf, len);
	return tmp;
}
